package javacafe.action.member;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import javacafe.action.Action;
import javacafe.action.ActionForward;
import javacafe.dto.member.MemberDTO;
import javacafe.serviceimple.MemberServiceImple;

public class BeforeCustUpdateAction implements Action {
	@Override
	public ActionForward execute(HttpServletRequest request,
			HttpServletResponse response) {
		ActionForward actfoward = new ActionForward();
		MemberServiceImple service = MemberServiceImple.getInstance();
		
		String m_id = request.getParameter("id");		
		MemberDTO dto = new MemberDTO();
		dto.setM_id(m_id);
		dto = service.getMember(dto);
		request.setAttribute("memdto", dto);
		System.out.println(dto);
		actfoward.setUrl("memberupdate");
		return actfoward;
	}
}
